{
  "properties" : { },
  "id" : "9d4800cfd55644fcb69bedaf3e1fbefb",
  "script" : null,
  "groupId" : "97f65e4b68e1427f857047c67d7e3f42",
  "name" : "查询告警对象列表",
  "createTime" : 1727070902223,
  "updateTime" : 1724829709574,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "list",
  "method" : "GET",
  "parameters" : [ {
    "name" : "current",
    "value" : "1",
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  }, {
    "name" : "size",
    "value" : "10",
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 52,\n        \"current\": 1,\n        \"size\": 30,\n        \"records\": [\n            {\n                \"id\": 6914,\n                \"code\": \"D6728496484103623110\",\n                \"targetName\": \"1602接入交换机\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.183.126\",\n                \"rowId\": 1\n            },\n            {\n                \"id\": 6915,\n                \"code\": \"D6730766031342567252\",\n                \"targetName\": \"一区接入交换机11-L10-0\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.13\",\n                \"rowId\": 2\n            },\n            {\n                \"id\": 6916,\n                \"code\": \"D6848738298233250928\",\n                \"targetName\": \"1310接入交换机\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.188.254\",\n                \"rowId\": 3\n            },\n            {\n                \"id\": 6917,\n                \"code\": \"D2497641422953664496\",\n                \"targetName\": \"172.31.1.3\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.3\",\n                \"rowId\": 4\n            },\n            {\n                \"id\": 6918,\n                \"code\": \"D3640775441714456655\",\n                \"targetName\": \"二区接入交换机2-L7-0\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.2.6\",\n                \"rowId\": 5\n            },\n            {\n                \"id\": 6919,\n                \"code\": \"D1116326880236926490\",\n                \"targetName\": \"18F GCS室接入接入交换机\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.180.252\",\n                \"rowId\": 6\n            },\n            {\n                \"id\": 6920,\n                \"code\": \"D5248109091915608175\",\n                \"targetName\": \"1605接入交换机\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.184.254\",\n                \"rowId\": 7\n            },\n            {\n                \"id\": 6921,\n                \"code\": \"D1008773477770992758\",\n                \"targetName\": \"一区接入交换机10-L6-0\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.12\",\n                \"rowId\": 8\n            },\n            {\n                \"id\": 6922,\n                \"code\": \"D4195878255469743023\",\n                \"targetName\": \"18F接入交换机\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.187.254\",\n                \"rowId\": 9\n            },\n            {\n                \"id\": 6923,\n                \"code\": \"D8042427562884863672\",\n                \"targetName\": \"二区接入交换机1-L7-0\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.2.5\",\n                \"rowId\": 10\n            },\n            {\n                \"id\": 6924,\n                \"code\": \"D8549181443480134039\",\n                \"targetName\": \"一区接入交换机6-L4-0\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.8\",\n                \"rowId\": 11\n            },\n            {\n                \"id\": 6925,\n                \"code\": \"D4540528104777707258\",\n                \"targetName\": \"二区核心交换机\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.2.254\",\n                \"rowId\": 12\n            },\n            {\n                \"id\": 6926,\n                \"code\": \"D3643096704711307081\",\n                \"targetName\": \"创新室交换机\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.186.254\",\n                \"rowId\": 13\n            },\n            {\n                \"id\": 6927,\n                \"code\": \"D1986092395206126763\",\n                \"targetName\": \"test公网\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"60.2.2.2\",\n                \"rowId\": 14\n            },\n            {\n                \"id\": 6928,\n                \"code\": \"D8887434952111926807\",\n                \"targetName\": \"一区接入交换机9-L6-0\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.11\",\n                \"rowId\": 15\n            },\n            {\n                \"id\": 6930,\n                \"code\": \"D8482700119879070882\",\n                \"targetName\": \"一区核心交换机\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.254\",\n                \"rowId\": 16\n            },\n            {\n                \"id\": 6931,\n                \"code\": \"D1514469014965070996\",\n                \"targetName\": \"二区管控平台\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.2.10\",\n                \"rowId\": 17\n            },\n            {\n                \"id\": 6932,\n                \"code\": \"D5382877798234608881\",\n                \"targetName\": \"二区接入交换机4-L9-0\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.2.4\",\n                \"rowId\": 18\n            },\n            {\n                \"id\": 6933,\n                \"code\": \"D1499687279648889888\",\n                \"targetName\": \"1608办公室接入交换机1\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.180.254\",\n                \"rowId\": 19\n            },\n            {\n                \"id\": 6934,\n                \"code\": \"D3078752520401311618\",\n                \"targetName\": \"二区接入交换机6-L10-0\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.2.8\",\n                \"rowId\": 20\n            },\n            {\n                \"id\": 6935,\n                \"code\": \"D8190856871139505881\",\n                \"targetName\": \"1710\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.185.254\",\n                \"rowId\": 21\n            },\n            {\n                \"id\": 6936,\n                \"code\": \"D7308664258133244201\",\n                \"targetName\": \"一区接入交换机12-L10-0\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.14\",\n                \"rowId\": 22\n            },\n            {\n                \"id\": 6937,\n                \"code\": \"D1952795916089957798\",\n                \"targetName\": \"二区接入交换机3-L9-0\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.2.3\",\n                \"rowId\": 23\n            },\n            {\n                \"id\": 6938,\n                \"code\": \"D8799281961304130188\",\n                \"targetName\": \"二区接入交换机5-L10-0\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.2.7\",\n                \"rowId\": 24\n            },\n            {\n                \"id\": 6939,\n                \"code\": \"D5784306340412070982\",\n                \"targetName\": \"1608办公室接入交换机2\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.180.253\",\n                \"rowId\": 25\n            },\n            {\n                \"id\": 6940,\n                \"code\": \"D4895505293269430549\",\n                \"targetName\": \"一区接入交换机5-L4-0\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.7\",\n                \"rowId\": 26\n            },\n            {\n                \"id\": 6941,\n                \"code\": \"D5382114320706068433\",\n                \"targetName\": \"一区接入交换机2-L1-0\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.4\",\n                \"rowId\": 27\n            },\n            {\n                \"id\": 6942,\n                \"code\": \"D8772397186066328878\",\n                \"targetName\": \"1210\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.181.253\",\n                \"rowId\": 28\n            },\n            {\n                \"id\": 6943,\n                \"code\": \"D1510221911763002616\",\n                \"targetName\": \"一区接入交换机3-L3-0\",\n                \"targetType\": 2,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"172.31.1.5\",\n                \"rowId\": 29\n            },\n            {\n                \"id\": 6944,\n                \"code\": \"D8931802129820115482\",\n                \"targetName\": \"1201\",\n                \"targetType\": 1,\n                \"targetDescr\": \"\",\n                \"enable\": 1,\n                \"ip\": \"180.180.181.254\",\n                \"rowId\": 30\n            }\n        ]\n    }\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
var sql = """
    SELECT * FROM alarm_target
    <where>
        <if test="targetName != null and targetName != ''">
            AND TARGET_NAME LIKE  CONCAT('%',#{targetName} ,'%')
        </if>
    </where>
"""

return db.page(sql) 